package com.orangelife.utils;

import java.io.ByteArrayOutputStream;
import java.io.InputStream;

public class ProConfig {

	public static String getProValues(String importValue) {
		String url = "";

		ProFile proFile = new ProFile();
		url = proFile.getProValues(importValue);

		return url;
	}

	public static String getConfig(String importValue) {
		String url = "";

		ProFile proFile = new ProFile();
		url = proFile.getConfig(importValue);

		return url;
	}

	public static String getCode(String importValue) {
		String url = "";

		ProFile proFile = new ProFile();
		url = proFile.getCode(importValue);

		return url;
	}

	public static String getBasePro(String importValue) {
		String url = "";

		ProFile proFile = new ProFile();
		url = proFile.getBasePro(importValue);

		return url;
	}

	public static InputStream getImage() {
		ProFile proFile = new ProFile();
		return proFile.getFile("/dtables/12.png");
	}

	public static byte[] readStream(InputStream inStream) throws Exception {
		ByteArrayOutputStream outSteam = new ByteArrayOutputStream();
		byte[] buffer = new byte[1024];
		int len = -1;
		while ((len = inStream.read(buffer)) != -1) {
			outSteam.write(buffer, 0, len);
		}
		outSteam.close();
		inStream.close();
		return outSteam.toByteArray();
	}

}
